%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Requires package ifthen.sty.

% Auxiliary lenght for defining the length of comments.
  \newlength{\commentslength}
  \newcommand{\setcommentslength}
       {\setlength{\commentslength}{\textwidth}
        \addtolength{\commentslength}{-4.0\parindent}}

% Comment.
  \newenvironment{mycommentenv}
     {\setcommentslength
      \begin{center} 
      \begin{minipage}{\commentslength}
         \small \sffamily}
      {\end{minipage}
       \end{center}}  
  \newcommand{\mycomment}[1]
      {\begin{mycommentenv}
          {#1}
       \end{mycommentenv}}
% Framed Comments.
  \newcommand{\fmycomment}[1]
     {\setcommentslength
      \begin{center} 
         \fbox{\parbox{\commentslength}{\textsf{\small {#1}}}}
      \end{center}}

% Observation. 
  \newcommand{\obs}[1]{\mycomment{$\otimes$ #1}}
  \newenvironment{obsenv}
      {\begin{mycommentenv}
         $\otimes$}
      {\end{mycommentenv}}
% Future work.
  \newcommand{\future}[1]{\mycomment{$\oslash$ #1}}
  \newenvironment{futureenv}
      {\begin{mycommentenv}
         $\oslash$}
      {\end{mycommentenv}}
% Idea to be explored soon.
  \newcommand{\idea}[1]{\fmycomment{#1}}
% Get text from a given source.
  \newcommand{\getfrom}[1]
     {\medskip\noindent\textsc{TO COME FROM\@:} \emph{#1}\medskip}

% Adding optional code, according to the argument of \baddif
% and \eaddif.
  \newenvironment{forget}
     {\setbox0=\vbox\bgroup}
     {\egroup}
  \newcommand{\baddif}[1]
     {\ifthenelse{\equal{#1}{true}}{}{\begin{forget}}}
  \newcommand{\eaddif}[1]
     {\ifthenelse{\equal{#1}{true}}{}{\end{forget}}}
  \newcommand{\baddifnot}[1]
     {\ifthenelse{\equal{#1}{false}}{}{\begin{forget}}}
  \newcommand{\eaddifnot}[1]
     {\ifthenelse{\equal{#1}{false}}{}{\end{forget}}}

% The ideal solution would be something like
%  \newenvironment{condalltt}[1][true]
%     {\begin{lrbox}{\savealltt}
%         \begin{minipage}{0.9\textwidth}}
%     {   \end{minipage}
%      \end{lrbox}
%      \ifthenelse{#1}{\usebox{\savealltt}}{}}  
% but arguments cannot be used in the closing part of
% an environment.
%
% Also, not everything can be used in a minipage, or in a
% lrbox environment.
%
% Also, true is explicitly used instead of a boolean variable;
% the test \boolean{var} seems only to work as an argument
% to \ifthenelse.




